<PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YUI IO HTTP Headers Test</title>
</head>

<body class="yui3-skin-sam">
<h1>IO HTTP Headers Test</h1>

<script type="text/javascript" src="../../../build/yui/yui.js"></script>
<script type="text/javascript">

(function() {
    YUI({
        base: "../../../build/",
        filter: "debug",
        logExclude: {
            attribute: true,
            dom: true,
            node: true,
            event: true,
            base: true,
            widget: true,
            selector: true,
            io:true
        },
        useConsole: true
    }).use("test", "console", "io-base", function(Y) {

        var console = new Y.Console().render(),
			io = new Y.IO();

        var add_header = new Y.Test.Case({
            name: 'Add HTTP Header',
            'test': function() {
				Y.io.header('Content-Type', 'application/xml');
				Y.Assert.areSame('application/xml', io._headers['Content-Type']);
            }
        });

        var delete_header = new Y.Test.Case({
            name: 'Delete HTTP Header',
            'test': function() {
				Y.io.header('Content-Type');
				Y.io.header('X-Requested-With');
				Y.Assert.areSame(undefined, io._headers['Content-Type']);
				Y.Assert.areSame(undefined, io._headers['X-Requested-With']);
            }
        });

	Y.Test.Runner.add(add_header);
	Y.Test.Runner.add(delete_header);
	Y.Test.Runner.run();
});
})();
</script>
</body>
</html>